package org.example.myleet.p1004;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(0 == solution.longestOnes(new int[]{0}, 0));
        Assert.isTrue(0 == solution.longestOnes(new int[]{0,0,0,0,0}, 0));
        Assert.isTrue(1 == solution.longestOnes(new int[]{1}, 0));
        Assert.isTrue(4 == solution.longestOnes(new int[]{1,1,1,0,0,0,1,1,1,1,0}, 0));
        Assert.isTrue(5 == solution.longestOnes(new int[]{1,1,1,0,0,0,1,1,1,1,0}, 1));
        Assert.isTrue(6 == solution.longestOnes(new int[]{1,1,1,0,0,0,1,1,1,1,0}, 2));
        Assert.isTrue(10 == solution.longestOnes(new int[]{0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1}, 3));
    }
}
